package simple.zombie;

// JFC
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.net.*;

// GTGE
import com.golden.gamedev.*;
import com.golden.gamedev.object.*;

import java.awt.event.KeyEvent;
import com.golden.gamedev.object.sprite.*;

public class Zombie extends MainCharacter {

  def SW = 1;
  def W  = 2;
  def NW = 3;
  def N  = 4;
  def NE = 5;
  def E  = 6;
  def SE = 7;
  def S  = 8;
  
  def directionList     = [ N, NE, E, SE, S, SW, W, NW ];
  def currentDirection  = S;
  def stanceFrameList   = [ 1, 2, 3, 4 ];
  def walkFrameList     = [ 5, 6, 7, 8, 9, 10, 11, 12 ];
  def attackFrameList   = [ 13, 14, 15, 16, 17, 18, 19, 20 ];
  def hitFrameList      = [ 21, 22, 23, 24 ];
  def deadFrameList     = [ 21, 22, 23, 24, 25, 26, 27, 28 ];
  def headShotFrameList = [ 29, 30, 31, 32, 33, 34, 35, 36 ];
  def currentFrameList  = stanceFrameList;
  
  Sprite sprite;
  
  def stepSize = 5;
  
  public Zombie( x, y, stepSize, sprite ) {
    super( null, x, y, stepSize );
    this.coordinate.x = x;
    this.coordinate.y = y;
    this.stepSize     = stepSize;
    this.sprite       = sprite;
    //this.sprite = new AnimatedSprite( getImages( "images/zombie_topdown.png", 36, 8 ), this.coordinate.x, this.coordinate.y );
    sprite.setFrame( ( currentDirection - 1 ) * 36 + currentFrameList[ 0 ] );
    sprite.setAnimationFrame( currentFrameList[ 0 ], currentFrameList[ -1 ] ) ;
  }
  
}